package org.example.util.constantUtil;

public class ConstantUtil {

    /**
     * TB 相关
     */
    // 最大数量限制
    public static final String LIMIT=String.valueOf(Integer.MAX_VALUE);

    // 获取当前用户相关常量
    public static final String USER_CUSTOMER="CUSTOMER_USER"; // 客户用户
    public static final String USER_TENANT_ADMIN="TENANT_ADMIN"; //租户管理员

    //=====================Device Controller=====================
    // 设备类型
    public static final String TYPE="电池包";


    /**
     * Mqtt相关
     */

    // MQTT前后缀
    public static final String TOPIC_PREFIX="zmh/";//前缀
    //控制指令后缀
    public static final String PUB_TOPIC_SUFFIX_CONTROL = "/C2";
    public static final String SUB_TOPIC_SUFFIX_CONTROL = "/C1";
    // 业务状态指令后缀
    public static final String PUB_TOPIC_SUFFIX_BUSINESS = "/bsLtoZ";
    public static final String SUB_TOPIC_SUFFIX_BUSINESS = "/bsZtoL";

    public static final int QOS_1 = 1;
    public final static String MQTT_CLIENT_ID = "SpringBootClient";
    public static final String MQTT_USER_NAME = "BS53CLIENT";
    public final static String MQTT_PASSWORD = "13011301";
    public final static int MQTT_KEEP_ALIVE = 60;
    public final static int MQTT_CONTROL_TIMEOUT_MS = 5000;  // 等待时间

    /**
     * 项目自身相关
     */
    // 无效数据表示 暂定为-1
    public static final String INVALID_DATA = "-1";
    /**
     * 电池包控制相关
     */
    // 超时时长
    public final static int CONTROL_TTL_SECOND = 5;  // 5 秒超时
    // C2帧长度
    public final static int FRAME_C2_BYTES = 8;

}
